<?php

namespace app\lib\tool;

class Date
{
    /* 获取过去一周的日期 */
    public static function getWeek()
    {
        $list = [];
        for ($time = time(); $time > time() - 86400 * 7; $time = $time - 86400) {
            $date = date('Y-m-d', $time);
            $list[] = $date;
        }
        return array_reverse($list);
    }
}
